Wire Broker listeners to healthchecks#7141
Merged
Merged
Conversation
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
matheuscscp
force-pushed
the
broker-health
branch
from
July 16, 2026 00:03
cdf8b98 to
0628551
Compare
matheuscscp
marked this pull request as ready for review
July 16, 2026 00:05
matheuscscp
requested review from
MarcosDY,
amartinezfayo,
rturner3 and
sorindumitru
as code owners
July 16, 2026 00:05
There was a problem hiding this comment.
Pull request overview
This PR updates the SPIRE Agent startup/healthcheck wiring so that the Broker API (when configured) is treated as part of “API readiness” before the agent is considered started and before health checks begin serving.
Changes:
- Add a “listening” hook to broker endpoints and expose a
WaitForListeningmethod. - Update agent startup coordination to wait for all enabled APIs (Workload/SDS and Broker) to begin listening before setting
a.startedand unblocking health checks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/agent/broker/endpoints.go | Adds a listening hook and WaitForListening signal so broker listeners can participate in agent readiness gating. |
| pkg/agent/agent.go | Aggregates readiness signals from enabled API servers (agent endpoints + broker endpoints) before marking the agent started and enabling health checks. |
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
sorindumitru
approved these changes
Jul 16, 2026
sorindumitru
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @matheuscscp!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of: #7116
When enabled, Broker API will now be part of the health checks.